import { Route, Routes, Navigate } from "react-router-dom"
import Issues from "../pages/Issues"
import Books from "../pages/Books"
import Interviews from "../pages/Interviews"
import AddIssue from "../pages/AddIssue"
import IssueDetail from "../pages/IssueDetail"
import Search from "../pages/Search"
import Personal from "../pages/Personal"
import BookDetail from "../pages/BookDetail"

function RouterConfig() {
  return (
    <Routes>
      <Route path="/issues" element={<Issues />}></Route>
      <Route path="/issues/:id" element={<IssueDetail />}></Route>
      <Route path="/books" element={<Books />}></Route>
      <Route path='/books/:id' element={<BookDetail />}></Route>
      <Route path="/interviews" element={<Interviews />}></Route>
      <Route path="/addIssue" element={<AddIssue />}></Route>
      <Route path="/search" element={<Search />}></Route>
      <Route path="/person" element={<Personal />}></Route>
      <Route path="/" element={<Navigate replace to="/issues" />}></Route>
    </Routes>
  )
}

export default RouterConfig
